<?php
namespace app\models\request;


use app\components\GoodsValidator;
use yii\base\Model;

class ReqCreateOrder extends Model
{

    private $addressId;

    private $userId;

    private $goodsList;

    /**
     * @return mixed
     */
    public function getAddressId()
    {
        return $this->addressId;
    }

    /**
     * @param mixed $addressId
     */
    public function setAddressId($addressId)
    {
        $this->addressId = $addressId;
    }

    /**
     * @return mixed
     */
    public function getUserId()
    {
        return $this->userId;
    }

    /**
     * @param mixed $userId
     */
    public function setUserId($userId)
    {
        $this->userId = $userId;
    }

    /**
     * @return mixed
     */
    public function getGoodsList()
    {
        return $this->goodsList;
    }

    /**
     * @param mixed $goodsList
     */
    public function setGoodsList($goodsList)
    {
        $this->goodsList = $goodsList;
    }



    public function rules()
    {
        return [
            [['addressId','goodsList'], 'required'],
            ['goodsList', GoodsValidator::class],
        ];
    }


}